package tj.eskhata.pos.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.*;

@Entity
@Table(name="users")
public class User implements DomainObject {
	@Id
	private Long id;	
	
	@Column(name="name")
	private String fullname;
	
	@Column(name="cl_point_id")
	private Long clPointId;
	
	@Column(name="login")
	private String wiaUsername;
	
	@Column(name="passw")
	private String wiaPassword;
	
	//@Column(name="status_id")
	//private Long statusId;
	@ManyToOne
	private Status status;
	
	@Column(name="date_reg")
	private Date dateReg;
	
	@Column(name="date_ll")
	private Date dateLl;
	
	@Column(name="passw_salt")
	private String passwSalt;
	
	//private boolean isAdmin;
	

  public User() {
  }

  public User(String username, String password, String fullname  ) {
    this.id=Long.valueOf(1);
	this.wiaUsername = username;
    this.wiaPassword = password;
    this.fullname = fullname;
    //this.isAdmin=isAdmin;
  }

  public String getFullname() {
    return fullname;
  }

  public String getWiaPassword() {
    return wiaPassword;
  }

  public String getWiaUsername() {
    return wiaUsername;
  }
 
  public void setFullname(String fullname) {
    this.fullname = fullname;
  }

  public void setWiaPassword(String password) {
    this.wiaPassword = password;
  }

  public void setWiaUsername(String username) {
    this.wiaUsername = username;
  }

  public Long getId() {
		return this.id;
  }
  
  public Long getClPointId() {
	    return clPointId;
  }
  public Status getStatus() {
	    return status;
  }
  public Date getDateReg() {
	    return dateReg;
  }
  public Date getDateLl() {
	    return dateReg;
  }
  public String getPasswSalt() {
	    return passwSalt;
  }
  public void getClPointId(Long clPointId_) {
	  this.clPointId=clPointId_;
  }
  public void setStatusId(Status status_) {
	  this.status=status_;
  }
  public void setDateReg(Date dateReg_) {
	  this.dateReg=dateReg_;
  }
  public void setDateLl(Date dateLl_) {
	  this.dateLl=dateLl_;
  }
  public void setPasswSalt(String passwSalt_) {
	  this.passwSalt=passwSalt_;
  }
  /*public boolean getIsAdmin() {
	    return this.isAdmin;
  }
  public void setIsAdmin(boolean isAdmin) {
		this.isAdmin = isAdmin;
  }
  */
}
